Data compression systems are known in the prior art that encode a stream of digital data signals into compressed digital code signals. The compressed signals may then be decoded back into the original data. Such a compression system is used to effect a savings in the amount of memory required to hold the data or the amount of time required to transmit a given body of digital information. ISO 8824:1990 and ISO 8825:1990 are each incorporated herein by reference.
In the BER encoding method of ASN.1, each data value consists of a type, a length and a value. The purpose of the BER encoding is to compress the data into the smallest number of bytes for transport across relatively slow communications mediums. Although three methods are described in BER for encoding the length information, one of the methods provides the tightest packet. Since some ASN.1 data types such as SEQUENCE and SET can contain many other values, the algorithm for encoding must look ahead to calculate the length of a composite data value. This is necessary as the appropriate number of bytes must be reserved in the data buffer to encode the length.
Data compression is especially important with regard to local area networks in that network management protocols are implemented which require compression for transport across the relatively slow communications media. In the past, the process of encoding ASN.1 protocol data units (PDUs) required two passes. The first pass calculates the length of various data values. During the second pass the actual data values are laid out into a data buffer as an encoded stream of bytes. This presents a difficult way to encode the data particularly when compiling a library of simple network management protocol (SNMP) encoding and decoding routines.
U.S. Pat. No. 5,375,204 to Motoyama et al discloses a system and method for efficient binary encoding which avoids a two pass encoding. According to the Motoyama et al system and method memory locations are reserved in the temporary storage buffer for storing the length of the procedure. The procedure is converted to binary format which is then appended to the end of the buffer after the space reserved for the length of the procedure. Procedures may be nested within procedures and space is reserved in the buffer for length information and binary representation of the nest of procedures, appended onto the end of the buffer. When a procedure ends, the length of the procedure is calculated and written into the space previously reserved for length information. This provides a memory buffer which can be considered a logically contiguous memory buffer.
Although the Motoyama et al system could be used in the compression of data for simple network management protocol encoding and decoding routines, the optimum encoding length is achieved by using the compressed length notation. This is the preferred method for encoding length in the SNMP subset of BER.